/**
 * 
 */
package com.fashion.server.domain.request;

import java.util.List;

/**
 * 查询参数封装
 * @author WangXin
 * 
 */
public class HttpQueryParam {

	private String fields;
	private Integer start;
	private Integer size;
	private String orderColumn;
	private Integer orderDirection;
	private Integer isQueryCount; //是否是查询count
	private Integer needTotal;//需要返回total
	private List<QueryCondition> queryConditions;
	private String sign; //签名
	private String callback;

	public Integer getNeedTotal() {
		return needTotal;
	}

	public void setNeedTotal(Integer needTotal) {
		this.needTotal = needTotal;
	}

	public Integer getIsQueryCount() {
		return isQueryCount;
	}

	public void setIsQueryCount(Integer isQueryCount) {
		this.isQueryCount = isQueryCount;
	}

	public boolean needTotalCount(){
		if(null!=needTotal && needTotal.compareTo(1)==0){
			return true;
		}else{
			return false;
		}
	}

	public boolean onlyQueryCount(){
		if(null!=isQueryCount && isQueryCount.compareTo(1)==0){
			return true;
		}else{
			return false;
		}
	}

	/**
	 * @return the fields
	 */
	public String getFields() {
		return fields;
	}

	/**
	 * @param fields
	 *            the fields to set
	 */
	public void setFields(String fields) {
		this.fields = fields;
	}

	/**
	 * @return the start
	 */
	public Integer getStart() {
		return start;
	}

	/**
	 * @param start
	 *            the start to set
	 */
	public void setStart(Integer start) {
		this.start = start;
	}

	/**
	 * @return the size
	 */
	public Integer getSize() {
		return size;
	}

	/**
	 * @param size
	 *            the size to set
	 */
	public void setSize(Integer size) {
		this.size = size;
	}

	/**
	 * @return the orderColumn
	 */
	public String getOrderColumn() {
		return orderColumn;
	}

	/**
	 * @param orderColumn
	 *            the orderColumn to set
	 */
	public void setOrderColumn(String orderColumn) {
		this.orderColumn = orderColumn;
	}

	/**
	 * @return the queryConditions
	 */
	public List<QueryCondition> getQueryConditions() {
		return queryConditions;
	}

	/**
	 * @param queryConditions
	 *            the queryConditions to set
	 */
	public void setQueryConditions(List<QueryCondition> queryConditions) {
		this.queryConditions = queryConditions;
	}

	/**
	 * @return the orderDirection
	 */
	public Integer getOrderDirection() {
		return orderDirection;
	}

	/**
	 * @param orderDirection the orderDirection to set
	 */
	public void setOrderDirection(Integer orderDirection) {
		this.orderDirection = orderDirection;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getCallback() {
		return callback;
	}

	public void setCallback(String callback) {
		this.callback = callback;
	}
}
